﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StoragePeriod.IDAL.FoodTesting;
using StoragePeriod.DALFactory;
using StoragePeriod.Model.FoodTesting;

namespace StoragePeriod.BLL.FoodTesting
{
    /// <summary>
    /// 蛋白质含量表
    /// </summary>
    public class T_ProteinData
    {
        I_ProteinData dal = new DataAccess<I_ProteinData>().CreateInstance("FoodTesting.D_ProteinData");

        /// <summary>
        /// 获取检查数据实体
        /// </summary>
        /// <param name="eVcData">查询ID</param>
        /// <returns>返回对应的实体</returns>
        public E_ProteinData GetDataEntityById(E_ProteinData eProteinDat)
        {
            return dal.GetDataEntityById(eProteinDat);
        }

        /// <summary>
        /// 根据原料ID和检测时间 删除检测记录
        /// </summary>
        /// <param name="eVcData">要删除的检测记录</param>
        /// <returns></returns>
        public int RemoveByTime(E_ProteinData eProteinDat)
        {
            return dal.RemoveByTime(eProteinDat);
        }

        /// <summary>
        /// 根据原料ID 和检测时间 获取所有的检测记录
        /// </summary>
        /// <param name="eVcData">要获取的检测记录</param>
        /// <returns></returns>
        public List<E_ProteinData> GetDataListByTime(E_ProteinData eProteinDat)
        {
            return dal.GetDataListByTime(eProteinDat);
        }

        /// <summary>
        /// 删除某一次检测记录
        /// </summary>
        /// <param name="eVcData">要删除的检测记录</param>
        /// <returns></returns>
        public int RemoveByFoodNum(E_ProteinData eProteinDat)
        {
            return dal.RemoveByFoodNum(eProteinDat);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(E_ProteinData eProteinDat)
        {
            return dal.Add(eProteinDat);
        }
    }
}
